package com.ctbiyi.ureport.config;

import com.bstek.ureport.console.UReportServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

/**
 * @projectName: ureport-demo
 * @packageName: com.ctbiyi.ureport.config
 * @description:
 * @author: hy.bai
 * @date: 2023-05-13 19:20
 */
@Configuration
@ComponentScan("com.ctbiyi.ureport")
@ImportResource("classpath:ureport-context.xml")
public class UReportConfig {
    /**
     * 把UReportServlet对象注册成Bean
     */
    @Bean
    public ServletRegistrationBean ureportServlet() {
        return new ServletRegistrationBean(new UReportServlet(), "/ureport/*");
    }
}
